#include "UiNaviPathChoice.h"
#ifdef MERGER_APP_TO_SHELL
	extern HINSTANCE g_SDHResModuleHandle;
#endif
extern wchar_t						g_wszNaviFileName[MAX_PATH];
UiNaviPathChioce::UiNaviPathChioce()
{
}

UiNaviPathChioce::~UiNaviPathChioce()
{
}

BOOL UiNaviPathChioce::InitUiWin(void)
{
	BOOL bRtn = FALSE;
	LoadiInterItem();
	return bRtn;
}

void UiNaviPathChioce::PaintWin(HDC hdc, RECT* prcWin, RECT* prcUpdate)
{
//	m_NaviPahtChioceWndBG->Draw(hdc, prcWin, false, false);
}

int UiNaviPathChioce::OnLButtonDown(UINT fwKeys, int xPos, int yPos)
{
	return UiWin::OnLButtonDown(fwKeys, xPos, yPos);

}

int UiNaviPathChioce::OnLButtonUp(UINT fwKeys, int xPos, int yPos)
{
	return UiWin::OnLButtonUp(fwKeys, xPos, yPos);

}

void UiNaviPathChioce::LoadiInterItem()
{
//jdhuang 20120818
#ifndef MERGER_APP_TO_SHELL	
//	m_NaviPahtChioceWndBG = ImagingHelper::GetImageObject(MzGetInstanceHandle(), 1065);
#else
//	m_NaviPahtChioceWndBG = ImagingHelper::GetImageObject(g_SDHResModuleHandle, 3065);
#endif
#if 0
	//List PhoneBook
	RECT rtBrowserList[]=
	{
		118, 90, 655, 410,//ListWnd 
		50,  2, 587, 55,//Name Label
		100,  37, 637, 55,//Number Comment
	};
	m_BrowserList.SetPos(rtBrowserList[0].left,rtBrowserList[0].top, 
		rtBrowserList[0].right - rtBrowserList[0].left, rtBrowserList[0].bottom - rtBrowserList[0].top);
	m_BrowserList.SetID(8200);
	m_BrowserList.EnableScrollBarV(true);
	m_BrowserList.EnableNotifyMessage(true);
	m_BrowserList.SetItemHeight(59);
	m_BrowserList.SetTextColor(RGB(255,255,255));
//	m_BrowserList.SetTextRect(&rtText);
	m_BrowserList.SetTextProperty(&rtBrowserList[1], &rtBrowserList[2], 28, 18);

	AddChild(&m_BrowserList);
#else

	RECT rtText = {55, 3, 587, 43};
	RECT rtLeftIcon = {10, 14, 40, 44};
	RECT rtDownIcon = {10, 14, 35, 39};
	RECT rtRightIcon = {10, 14, 35, 39};
/*
	RECT rtText = {173, 5, 587, 53};
	RECT rtLeftIcon = {128, 14, 158, 44};
	RECT rtDownIcon = {128, 14, 153, 39};
	RECT rtRightIcon = {128, 14, 153, 39};
*/
	//	m_BrowserList.SetPos(0,119, 302, 357);
	m_BrowserList.SetPos(118, 90, 537, 320);
//	m_BrowserList.SetPos(0, 0, 655, 410);
	m_BrowserList.SetID(8200);
	m_BrowserList.EnableScrollBarV(true);
	m_BrowserList.EnableNotifyMessage(true);
	m_BrowserList.SetItemHeight(46);
	m_BrowserList.SetTextColor(RGB(255,255,255));
	m_BrowserList.SetTextRect(&rtText);
#ifndef MERGER_APP_TO_SHELL	
	m_BrowserList.SetVideoLeftIconProperty(2026, &rtLeftIcon);
	m_BrowserList.SetDownIconProperty(2022, &rtDownIcon);
	m_BrowserList.SetRightIconProperty(2023, &rtRightIcon);
#else
	m_BrowserList.SetVideoLeftIconProperty(9011, &rtLeftIcon);
	m_BrowserList.SetDownIconProperty(9010, &rtDownIcon);
	m_BrowserList.SetRightIconProperty(9010, &rtRightIcon);
#endif
	AddChild(&m_BrowserList);
#endif


	RECT rtNaviPath = {100, 20, 600, 65};
	m_StaticNaviPath.SetPos(rtNaviPath.left, rtNaviPath.top, rtNaviPath.right-rtNaviPath.left, rtNaviPath.bottom-rtNaviPath.top);
	m_StaticNaviPath.SetText(g_wszNaviFileName);
	m_StaticNaviPath.SetTextSize(24);
	m_StaticNaviPath.SetTextColor(RGB(255, 255, 255));
	AddChild(&m_StaticNaviPath);
}

BOOL UiNaviPathChioce::InitImages()
{
	return TRUE;
}
void UiNaviPathChioce::DeleteImages()
{
}